1. Field of the Invention
The present invention relates to a processor, and more particularly to a processor having, as an instruction set, an instruction-synchronizing instruction that synchronizes the completion of execution of instructions, and to a processing method for the synchronization.
2. Description of the Related Art
In a processor for successively executing instructions, executing sections of the processor are often necessary to complete, until a certain point in time, execution of issued instructions. Such an operation of waiting for the completion of execution of instructions is called “instruction synchronization (sync)”. The instruction sync is necessary, for example, when a debugger carries out step execution in which instructions are executed one by one, or when it is to be positively assured that an instruction execution result has been output to an external memory, etc. The instruction sync can be realized by preparing an instruction-synchronizing instruction to execute the instruction sync in instruction sets for a processor, and causing the processor to execute the instruction-synchronizing instruction when the instruction sync is necessary.
Hitherto, in a processor capable of executing a plurality of threads in parallel, various techniques have been proposed as methods for performing the instruction sync for some thread. One of the proposed techniques is to realize the instruction sync, for example, by stopping instruction issuance for all the threads and waiting for until all executing sections complete instructions under execution at the time and come into an idle state (see, e.g., USP Application Publication No. 2004/023975 (FIG. 3)).